Optimal. Leaf size=20 \[ \frac{\cot (x)}{a \csc (x)+a}-\frac{\tanh ^{-1}(\cos (x))}{a} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.0560358, antiderivative size = 20, normalized size of antiderivative = 1., number of steps used = 3, number of rules used = 3, integrand size = 13, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.231, Rules used = {3789, 3770, 3794} \[ \frac{\cot (x)}{a \csc (x)+a}-\frac{\tanh ^{-1}(\cos (x))}{a} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 3789
Rule 3770
Rule 3794
Rubi steps
\begin{align*} \int \frac{\csc ^2(x)}{a+a \csc (x)} \, dx &=\frac{\int \csc (x) \, dx}{a}-\int \frac{\csc (x)}{a+a \csc (x)} \, dx\\ &=-\frac{\tanh ^{-1}(\cos (x))}{a}+\frac{\cot (x)}{a+a \csc (x)}\\ \end{align*}
Mathematica [B] time = 0.0528889, size = 44, normalized size = 2.2 \[ \frac{\log \left (\sin \left (\frac{x}{2}\right )\right )-\log \left (\cos \left (\frac{x}{2}\right )\right )-\frac{2 \sin \left (\frac{x}{2}\right )}{\sin \left (\frac{x}{2}\right )+\cos \left (\frac{x}{2}\right )}}{a} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.027, size = 24, normalized size = 1.2 \begin{align*} 2\,{\frac{1}{a \left ( \tan \left ( x/2 \right ) +1 \right ) }}+{\frac{1}{a}\ln \left ( \tan \left ({\frac{x}{2}} \right ) \right ) } \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A] time = 0.969735, size = 42, normalized size = 2.1 \begin{align*} \frac{\log \left (\frac{\sin \left (x\right )}{\cos \left (x\right ) + 1}\right )}{a} + \frac{2}{a + \frac{a \sin \left (x\right )}{\cos \left (x\right ) + 1}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] time = 0.480746, size = 204, normalized size = 10.2 \begin{align*} -\frac{{\left (\cos \left (x\right ) + \sin \left (x\right ) + 1\right )} \log \left (\frac{1}{2} \, \cos \left (x\right ) + \frac{1}{2}\right ) -{\left (\cos \left (x\right ) + \sin \left (x\right ) + 1\right )} \log \left (-\frac{1}{2} \, \cos \left (x\right ) + \frac{1}{2}\right ) - 2 \, \cos \left (x\right ) + 2 \, \sin \left (x\right ) - 2}{2 \,{\left (a \cos \left (x\right ) + a \sin \left (x\right ) + a\right )}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F] time = 0., size = 0, normalized size = 0. \begin{align*} \frac{\int \frac{\csc ^{2}{\left (x \right )}}{\csc{\left (x \right )} + 1}\, dx}{a} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A] time = 1.36932, size = 32, normalized size = 1.6 \begin{align*} \frac{\log \left ({\left | \tan \left (\frac{1}{2} \, x\right ) \right |}\right )}{a} + \frac{2}{a{\left (\tan \left (\frac{1}{2} \, x\right ) + 1\right )}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]